<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>修改课程</title>
	<load href="__JS__/menu.js" />
	<load href="__JS__/leftmenubar.js" />
	<load href="__CSS__/header.css" />
	<load href="__CSS__/footer.css" />
	<load href="__JS__/jQuery/jquery.js" />
   	<load href="__JS__/jQuery/jquery.form.js" />
   	<script   type= "text/javascript"> 
	function   subform(gourl){   
 	 var   gourl; 
  	form2.action=gourl; 
  	form2.submit(); 
	} 
	</script>   
   	
	<script type="text/JavaScript">
       $(function(){
           $('#form1').ajaxForm({
				//beforeSubmit:  function(){alert("before");},  // pre-submit callback
				success:       complete,  // post-submit callback
				error:function(){alert("error");},
				dataType: 'json'
			});
           
			function complete(data){
			if (data.status==1)
			{
				window.location='__URL__/coursedetail';
             }else{
				$('#result').html(data.info).show();
             }
		}
	});
       $(function(){
           $('#form3').ajaxForm({
				//beforeSubmit:  function(){alert("before");},  // pre-submit callback
				success:       complete,  // post-submit callback
				error:function(){alert("error");},
				dataType: 'json'
			});
           
			function complete(data){
			if (data.status==1)
			{
				window.location='__URL__/coursedetail';
             }else{
				$('#result').html(data.info).show();
             }
		}
	});
	</script>
</head>
<body>
	<layout name="Auth:header" />
	<div class="nowposition">
	<a href='__APP__/index/index' class="nowpositionhref">主页</a>>
	<a href='__URL__/index' class="nowpositionhref">后台管理</a>>
	<a href='__URL__/coursedetail' class="nowpositionhref">课程管理</a>>
	<a href="__URL__/courseedit" class="nowpositionhref">编辑课程</a>
	</div>
	<layout name="Auth:leftmenu" />
	<div style="margin-top:-180px; margin-left:200px; width:200px;">
		<a href="__URL__/addcustom/id/{$id}" style="font-size:17px; text-decoration:none; color:blue; font-weight:bold;">添加自定义页面</a>
	</div>
	<div class="course_edit">
	<form id="form1" method="post" action="__URL__/courseupdate" >
	<input type="hidden" name="id" value={$vo1.id}>
	<div>
		 <div id="result" align="left" style="margin-left:80px;" ></div>
		<div id="form_list" >
			<table border="0" align="center">
				<tr>
					<td width="300" >课程序号:{$vo1.number}</td>
					<td width="300" >课程名称:{$vo1.name}</td>
					<td width="300">所属院系:{$vo1.dname}</td>
					<td width="300">课程负责人:{$vo1.nname}</td>
				</tr>
				<tr>
					<td width="300" >修改课程序号：<input type="text" name="number" value={$vo1.number}></td>
					<td width="300" >修改课程名称：<input type="text" name="name" value={$vo1.name}></td>								
					<td width="300" >修改管理院系：<select name="departmentid">
													<volist name='deplist' id='vo'>
												  		<option value =	{$vo.id}>{$vo.name}</option>
												  	</volist>
												  </select>
												  </td>
					<td width="300" >修改课程负责人：<input type="text" name="nname" value={$vo1.nname}></td>
				</tr>
				<tr>
					<td><input type="submit" value="更新"></td>
				</tr>		
				</form>
				<form id="form3" method="post" action='__URL__/courseupdate'>
				<input type='hidden' name='id' value={$vo1.id}>
				<input type='hidden' name='name' value={$vo1.name}>
				<input type='hidden' name='departmentid' value={$vo1.departmentid}>
				<input type='hidden' name='number' value={$vo1.number}>
				<tr>
				<td width="300" ><input type="radio" name='choose' value='1' checked='checked'>设置主页：<select name="url1">
				<volist name='clist' id='vo'>
				<option value =	'course/custom/id/{$vo.courseid}/p/{$vo.id}'>{$vo.name}</option>
				</volist>
				<option value ='course/discuss/id/{$id}'>讨论区</option>
				<option value ='Course/download/id/{$id}'>资料下载</option>
				</select><br>
				<input type="radio" name='choose' value='2'>
				自定义主页<input type='text' name='url2' value='http://'><br>
				所属类别:<br>
				<select name='sort'>
					<volist name='slist' id='vo'>
					<option value =	{$vo}>{$vo}</option>
					</volist>
				</select><br>
				<if condition='$vo1.excellent eq 1'>
					<input type='checkbox' name='excellent' value="1" checked='checked'>是否为精品课程<br>
					<else/>
					<input type='checkbox' name='excellent' value="1" >是否为精品课程<br>
				</if>
				<input   type= "submit"   name= "Submit"   value= "提交"> 
				</td>
				</tr>
				</form>
				<form id="form2" method="post">
				<tr>
				<td width="300" >自定义页面：<select name="id">
				<volist name='clist' id='vo'>
				<option value =	{$vo.id}>{$vo.name}</option>
				</volist>
				</select>
				<input type='hidden' name='courseid' value='{$vo.courseid}'></td>
				</tr>
				<tr>
				<td><input   type= "button"   name= "btn1 "   value= "修改 "   onclick= "subform('__URL__/customedit'); "></td> 
				<td><input   type= "button"   name= "btn2 "   value= "删除 "   onclick= "subform('__URL__/customdelete'); "></td>
				</tr>	
				</form>
				</table>
				</div>
				

</body>
</html>